home *** CD-ROM | disk | FTP | other *** search
/ PC-Blue - MS DOS Public Domain Library / PC-Blue MS-DOS Public Domain Library - NYACC.iso / vol029 / chardisp.bas < prev    next >
Encoding:
BASIC Source File  |  1987-01-11  |  3.5 KB  |  87 lines

  1. 10 '     Picture City Personal Computer Programming Club    "CHARDISP"
  2. 20 '             Michael Csontos, 3228 Livonia Center Road, Lima, NY 14485
  3. 30 KEY OFF:CLS
  4. 40 PRINT "This program allows you to view the complete character set for
  5. 50 PRINT "       the IBM Personal Computer on the display in a form which
  6. 60 PRINT "       allows you to closely examine it for selection of characters
  7. 70 PRINT "       which might be useful for special purposes.
  8. 80 PRINT
  9. 90 PRINT "The entire set will scroll slowly and may be stopped at any time by
  10. 100 PRINT "       pressing <Ctrl> and <Num Lock> keys simutaniously. To resume
  11. 110 PRINT "       the scrolling, press the space bar.   Use <Ctrl>+<Break) to
  12. 120 PRINT "       stop before the end. If you then want to start elsewhere in
  13. 130 PRINT "       the series, type N=nnn, <"CHR$(217)"> 3 or 4 times, and <F5>.
  14. 140 PRINT "
  15. 150 PRINT "To use characters which are not represented by keys on the keyboard,
  16. 160 PRINT "      the sequence CHR$(n) must be used in a print statement, where
  17. 170 PRINT "      n is the number that appears at the beginning of the line
  18. 180 PRINT "      in the display, e.g. PRINT CHR$(146) produces ";CHR$(146);"."
  19. 190 PRINT
  20. 200 PRINT "Non-displayed characters are described only, since outputting them
  21. 210 PRINT "      to the display might produce a confusing result.
  22. 220 PRINT "
  23. 230 INPUT "Ready to start (Y/N)";A$
  24. 240 IF A$="Y" GOTO 290
  25. 250 IF A$="y" GOTO 290
  26. 260 IF A$="n" THEN GOTO 580
  27. 270 IF A$="N" THEN GOTO 580
  28. 280 PRINT:PRINT "The program will respond to keys y,Y,n or N only!":FOR W=1 TO 5000:NEXT :GOTO 10
  29. 290 CLS
  30. 300 FOR N=0 TO 255
  31. 310 IF N<10 THEN PRINT " ";
  32. 320 IF N<100 THEN PRINT " ";
  33. 330 PRINT N;
  34. 340 IF N=0 THEN PRINT "NULL":L$=STRING$(20,CHR$(1)):GOTO 740
  35. 350 IF N=7 THEN PRINT "BEEP";CHR$(7):GOTO 590
  36. 360 IF N=8 THEN PRINT "BACKSPACE":GOTO 590
  37. 370 IF N=9 THEN PRINT "TAB":GOTO 590
  38. 380 IF N=10 THEN PRINT "LINE FEED":GOTO 590
  39. 390 IF N=11 THEN PRINT "HOME":GOTO 590
  40. 400 IF N=12 THEN PRINT "FORM FEED":GOTO 590
  41. 410 IF N=13 THEN PRINT "CARRIAGE RETURN":GOTO 700
  42. 420 IF N=28 THEN PRINT "CURSOR RIGHT":GOTO 590
  43. 430 IF N=29 THEN PRINT "CURSOR LEFT":GOTO 590
  44. 440 IF N=30 THEN PRINT "CURSOR UP":GOTO 590
  45. 450 IF N=31 THEN PRINT "CURSOR DOWN":GOTO 590
  46. 460 IF N=32 THEN PRINT "SPACE":GOTO 730
  47. 470 IF N=255 THEN PRINT "BLANK 'FF'":GOTO 590
  48. 480 PRINT CHR$(N);"  ";
  49. 490 FOR M=1 TO 72
  50. 500 PRINT CHR$(N);
  51. 510 NEXT M
  52. 520 FOR Q=0 TO    5:NEXT'delay at end of full charactor lines
  53. 530 IF FIX(N/2)=N/2 THEN 600 ELSE 650
  54. 540 PRINT SPC(40);Z$;W$;:FOR P=0 TO 400:NEXT 'delay at end of split lines
  55. 550 GOSUB 760
  56. 560 NEXT N
  57. 570 FOR NN=0 TO 10:PRINT:FOR NNN=0 TO 1500:NEXT:PRINT:GOSUB 760:FOR NNNN=0 TO 1000:NEXT:NEXT:CLS
  58. 580 PRINT:PRINT "G";CHR$(1);CHR$(2);CHR$(3);"  B";CHR$(157);CHR$(144):PRINT:KEY ON:END
  59. 590 PRINT:FOR O=0 TO 10:NEXT:GOTO 550'delays for non-print lines
  60. 600 X$=CHR$(N)
  61. 610 Z$=STRING$(20,X$)
  62. 620 IF N=6 THEN Y$=" ":GOTO 640
  63. 630 Y$=CHR$(N+1)
  64. 640 W$=STRING$(20,Y$):GOTO 540
  65. 650 IF N=7 THEN Y$=" ":GOTO 670
  66. 660 Y$=CHR$(N)
  67. 670 W$=STRING$(20,Y$)
  68. 680 X$=CHR$(N+1)
  69. 690 Z$=STRING$(20,X$):GOTO 540
  70. 700 K$=STRING$(20,CHR$(14))
  71. 710 PRINT SPC(40);K$
  72. 720 GOTO 550
  73. 730 L$=STRING$(20,CHR$(33))
  74. 740 PRINT SPC(60);L$;
  75. 750 GOTO 550
  76. 760 DEF SEG = &HB800
  77. 770 FOR COLUMN = 50 TO 70
  78. 780 POKE ((CSRLIN-10)*160+(COLUMN-1)*2)+1,112
  79. 790 NEXT COLUMN
  80. 800 FOR COLUMN = 50 TO 70
  81. 810 POKE ((CSRLIN-11)*160+(COLUMN-1)*2)+1,112
  82. 820 NEXT COLUMN
  83. 830 RETURN
  84. 840 '           SAVE"CHARDISP
  85.  COLUMN = 50 TO 70
  86. 810 POKE ((CSRLIN-11)*160+(COLUMN-1)*2)+1,112
  87. 820 NEXT